/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 获取品牌信息
export const brandsDicts = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customerManage/customerManager/brandsdicts`, { params });
// 获取车系信息
export const seriessDict = (params, bsmp) => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict/${bsmp.brand}/seriessdict`, { params });
// 获取车型信息
export const modelsDict = (params, bsmp) => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict/${bsmp.brand}/seriessdict/${bsmp.series}/modelsdict`, { params });
// 获取配置信息
export const packagesDict = (params, bsmp) => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict/${bsmp.brand}/seriessdict/${bsmp.series}/modelsdict/${bsmp.model}/packagesdict`, { params });
// 获取颜色数据
export const colorInfo = (params, bsmp) => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/colors/colorinfo/${bsmp.series}/dicts`, { params });
// 查询服务工程师
export const queryServiceAss = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryServiceAss/dicts`, { params });
// 查询指定技师
export const queryTechnician = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryTechnician/dicts`, { params });
// 查询续保专员接口
export const queryInsurance = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryInsurance/dicts`, { params });
// 查询定保专员
export const queryMaintain = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryMaintain/dicts`, { params });
// 查询DCRC专员
export const queryDCRC = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryDCRC/dicts`, { params });
// 查询挂靠单位接口
export const attachunit = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/solicitude/attachunit`, { params });
// 查询首席顾问师
export const salesConsultant = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/isEmployee/salesConsultant`, { params });
// 查询经销商
export const dealertCode = params => axios.get(`${SERVER.DMS_WEB}/part/rest/partStocks/DealertCode`, { params });
// 查询优惠模式
export const queryDiscountMode = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/discountmodes/queryDiscountMode`, { params });

// 查询车辆明细数据
export const protectRepair = (params, val) => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/protectRepair/${val}`, { params });
// 查询车辆明细列表数据
export const queryInsuranceList = (params, val) => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/solicitude/query/insurance/${val}`, { params });
// 查询销售材料
export const queryRoLabourByRoNO = (params, val) => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/queryByLinsence/queryRoLabourByRoNO/${val}`, { params });
// 同步主机厂车辆数据
export const brandsdict = (params, val) => axios.get(`${SERVER.DMS_WEB}/customer/rest/customerManage/customerManager/brandsdict/${val}`, { params });
// VIN号在DCS系统无法同步
export const coudImplVin = (params, val) => axios.get(`${SERVER.DMS_WEB}/customer/rest/customerManage/customerManager/SEDMS004CoudImpl/${val}`, { params });
// 保存车辆明细
export const saveVehicle = (params, val) => axios.put(`${SERVER.DMS_WEB}/customer/rest/customer/solicitude/vehicle/${val.vin}/${val.ownerNo}`, params);
// 模拟接口
// export const warningProcessResult = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/repair/newEnergyWarning/warningProcessResult`, { params });
// 模拟接口
// export const getNoReadCount = params => axios.get(`${SERVER.DMS_WEB}/web/rest/noticeAdvise/getNoReadCount`, { params });
